package com.wkr.dubboconsumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.wkr.api.service.greet;
import com.wkr.dubboproviders.service.IMyService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RestfulTestController {

    @Reference(check = false)//关闭某个服务的启动时检查：（没有提供者时报错）
    IMyService iMyService;
    @Reference(check = false)
    greet oo;

    @RequestMapping("/hi")
    public void say() {
        String name = iMyService.Hello();
        System.out.println(name);
        String greets = oo.ISay();
        System.out.println(greets);
    }
}
